using Newtonsoft.Json;

namespace WxLib.Model
{
    public class Msg
    {
        public int Type { get; set; }
        public string Content { get; set; }
        public string FromUserName { get; set; }
        public string ToUserName { get; set; }
        public string LocalID { get; set; }
        public string ClientMsgId { get; set; }

        public string ToJson()
        {
            return "\"Msg\":" + JsonConvert.SerializeObject(new Msg
            {
                Type = Type,
                Content = Content,
                FromUserName = FromUserName,
                ToUserName = ToUserName,
                LocalID = LocalID,
                ClientMsgId = ClientMsgId
            });
        }
    }
}
